<template>
  <div class="container">
    <div class="box" v-longPress="handleLongPress"></div>
  </div>
</template>

<script setup>
const handleLongPress = () => {
  console.log('触发了红box的长按')
}
</script>

<style scoped>
.box {
  width: 100px;
  height: 100px;
  border: 1px solid red;
}
</style>
